﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml;
using System.IO;
using System.Data.OleDb;
using System.Drawing;
using ExtBusiness.FlowOperation;


public partial class WebPubManager_WorkViewUpLoad :PageBase
{
    protected WorkFlowPubSettting wfpsTemp = new WorkFlowPubSettting();
    DataTable dtTemp = new DataTable();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ViewState["flowid"] = Request.QueryString["flowid"];
            BindFlowView();
        }
    }

    /// <summary>
    /// 绑定上传的流程图
    /// </summary>
    /// <!--addby zhongjian 20100426-->
    public void BindFlowView()
    {
        dtTemp = wfpsTemp.GetWorkFlowView(ViewState["flowid"].ToString());
        if (dtTemp.Rows.Count > 0)
        {                     
            byte[] bArr = dtTemp.Rows[0]["flowview"] as Byte[];
            Response.Clear();
            Response.Buffer = true;
            if (bArr != null)
            {
                Response.BinaryWrite(bArr);
            }
            else
            {
                this.Response.Write("没有上传流程图。");
            }
        }
    }

}
